package tmproject.hlhj.fhp.cartrans.activitys

import kotlinx.android.synthetic.main.aty_aboutus.*
import tmproject.hlhj.fhp.cartrans.BaseAty
import tmproject.hlhj.fhp.cartrans.IView.AboutUsView
import tmproject.hlhj.fhp.cartrans.R
import tmproject.hlhj.fhp.cartrans.javaBean.AboutUsBean
import tmproject.hlhj.fhp.cartrans.presenter.AboutUsPresenter
import tmproject.hlhj.fhp.cartrans.utils.WebUtils

/**
 * Created by Never Fear   on 2018\8\29 0029.
Never More....
 */
class AboutUsAty :BaseAty<AboutUsView,AboutUsPresenter>(), AboutUsView {
    override fun initView() {
        WebUtils.initWeb(webView,this)
    }

    override fun logicStart() {
        presenter?.getUsInfo(this)
    }
    override fun setUsInfo(aboutUsBean: AboutUsBean) {
        WebUtils.loadUrl(webView,aboutUsBean.data.about_us)
    }
    override fun setListener() {
        btExit.setOnClickListener {
            finish()
        }
    }

    override fun bindView(): AboutUsView {
        return this
    }

    override fun createPresenter(): AboutUsPresenter {
        return AboutUsPresenter()
    }

    override fun getContentId(): Int {
        return R.layout.aty_aboutus
    }
}